import React from 'react';
import useMyHook from "./useMyHook";
const MyHook = () => {
    let setNum = useMyHook()
    return (
        <div>
            <button onClick={()=>{
                setNum(String(Number(document.title)+1))
            }}>+++</button>
            <button onClick={()=>{
                setInterval(()=>{
                     setNum(String(Number(document.title)+1))
                },100)
    }
            }>定时器</button>
        </div>
    );
};

export default MyHook;